package cn.cdeden.knowledge.service;

import cn.cdeden.common.core.utils.page.TableDataInfo;
import cn.cdeden.knowledge.domain.FilesDistribute;
import cn.cdeden.knowledge.domain.dto.FilesDistributeDto;
import cn.cdeden.knowledge.domain.dto.FilesDistributeQueryParam;
import cn.cdeden.knowledge.domain.dto.RecoverFileChooseAPath;
import com.baomidou.mybatisplus.extension.service.IService;
import io.undertow.util.BadRequestException;
import org.springframework.data.domain.Pageable;

public interface FilesDistributeService extends IService<FilesDistribute>{


    /**
     * 查询我的分发
     * @param query 条件
     * @param pageable 分页参数
     * @return PageInfo<FilesDistributeDto>
     */
    TableDataInfo<FilesDistributeDto> queryDistribute(FilesDistributeQueryParam query, Pageable pageable);



    /**
     * 查询我的接收
     * @param query 条件
     * @param pageable 分页参数
     * @return PageInfo<FilesDistributeDto>
     */
    TableDataInfo<FilesDistributeDto> querySend(FilesDistributeQueryParam query, Pageable pageable);



    boolean receiveFile(RecoverFileChooseAPath recoverFileChooseAPath) throws BadRequestException;


    int insert(FilesDistributeDto resources) throws BadRequestException;



}
